1. Field of the Invention
This invention relates to an image output control method and printing apparatus for receiving print data from a source for supply of data such as a host computer and printing out the data on a medium such as paper.
2. Description of the Related Art
A system for processing and printing documents such as a document creating and printing system generally is constructed as shown in FIG. 2. The system is constituted by a host computer 101 serving as a processor for subjecting an output document to processing such as typesetting, and a printer 102 connected to the host computer 101 for fixing output document data, which is the result of processing by the host computer, on a medium such as paper by performing printing on the medium. More specifically, the user employs the host computer 101 to edit an image that is to be output. When editing ends, the host computer 101 converts the edited document data to an output image, i.e. print data, that will be accepted by the printer 102, and sends this data to the printer 102. In accordance with the data input thereto, the printer 102 performs the actual printing on the paper.
The printer 102 includes a printer controller 1021 and a printer engine 1022. The processing executed by the printer controller 1021 will be described in detail with reference to the block diagram of FIG. 3 and flowchart of FIG. 4, which exemplify examples of the prior art.
FIG. 3 is a block diagram showing the internal components of the printer controller 1021. Specifically, an interface 201 receives print data from a source for supply of data such as the host computer and performs an exchange of status with the host computer. A control unit 202 controls the overall printer apparatus and executes data processing. A memory controller 203 controls a DRAM 204, which is a main memory provided within the printer controller. A DMAC 205 is provided so that the printer controller may send image data to a printer engine 207 at the time of printing. An engine interface 206 sends the printer engine 207 image data output via the DMAC 205. The printer engine 207 fixes the image data, which has been output by the engine interface 206, on a medium such as paper, thereby realizing printing.
FIG. 4 is a flowchart showing an example of the operation of the printer controller illustrated in the block diagram of FIG. 3.
Print data is received from a source for supply of data such as the a computer (step S301). The print data may be characteristic code data usable by the printer or a print instruction, referred to as page description language (PDL), to the printer. The received data is stored in the DRAM (step S302). In order to compensate for a difference in speed between the communication speed of the interface and the speed of data processing, the received data generally is buffered temporarily in a memory area, referred to as a reception buffer, of the DRAM 204. The processing of step S302 corresponds to this operation.
Next, the stored data is analyzed and preparation for printing the image is performed (step S303). In this example, band processing is executed. According to banding processing, the memory capacity of a full bitmap area is not used. Rather, use is made of two band memory areas (referred to as band buffers) of a size obtained by partitioning the paper size into prescribed widths in the main-scan direction. Image data is developed in these band buffers. With band processing, image data that has been stored in one band memory area is printed, during which time image data is generated in the other band memory area. Band processing is achieved through use of this double-buffer format employing two band buffers. To accomplish this, conversion of data to intermediate codes capable of undergoing banding processing is carried out at step S303. In regard to one page of data, an area obtained by partitioning the data according to the size of the band member is referred to as a band or print band.
Next, the image of the initial print band is developed in one of the band areas (S304). In actuality, since the format used here is the double-buffer format, only the images of the initial two bands, for which printing has not yet begun, are generated in the two band memory areas. Processing for generating image data based upon object data such as character codes and visualizing the generated image data shall be referred to as xe2x80x9crenderingxe2x80x9d below.
When rendering is completed, the DMAC 205 and engine interface 206 are set in a print-enabled state and the printer engine 207 is started (step S305). Printing is performed using the bit image already generated at step S304 (S306).
When image data is sent to the printer engine 207 via the DMAC 205 and engine interface 206 and the band memory is left empty, the control unit 202 renders the image data corresponding to the next print band in this band memory via the memory controller 203 (step S307).
When the printing of image data in one band memory is completed, page end is judged at step S308. If the printing of one page is not finished, the input to the DMAC 205 and engine interface 206 is changed over to the band memory from which printing is be performed next, thereby to prepare for the printing of the next band (S309). More specifically, resetting of the DMA transfer address and changing of the band memory address rasterized by the control unit 202 are performed taking advantage of an interrupt which gives notification of the end of transfer of the band image data from the DMAC 205.
If band changeover has been performed, the DMAC 205 and engine interface 206 transfer the image data of the next band to the printer engine 207 and the next band is printed by the engine. In addition, the control unit 202 rasterizes the image of the next band in the band memory whose image data has already been sent. One page of printing is achieved by repeating this operation.
It has been presumed here that two band memories serve as the areas for developing band images. Before the printer engine 207 is started up, rendering in these two band memories is completed at step S304. As a consequence, in the initial band printing, parallel operation in which the image data is rasterized while it is being transmitted does not occur. Further, since data to be printed vanishes also in regard to the operating sequence prior to the end of one page, parallel operation does not occur.
Further, arbitration for access to each DRAM due to a data request from the DMAC 205 at the time of parallel operation and data write by rasterization from the controller 202 is carried out by the memory controller 203.
In a device which performs one page of printing by executing such band processing without possessing one page of bitmap memory, rasterization processing during parallel operation cannot keep up with the sending of print data when the image to be rendered is complicated or when the printing speed of the printer is high. This phenomenon is known as overrun. The same problem arises also in an apparatus which handles grayscale image data by allocated a plurality of bits to each pixel to realize grayscale representation.
There is available a processing system which, in order to prevent overrun, avoids parallel operation by using a memory area which stores one page of image data. This memory is a so-called bitmap memory (or a byte map memory in case of a multilevel image of eight bits per pixel). This is a processing system equipped with a so-called full-page memory. Further, apparatus have appeared which, in order to improve memory efficiency and hold down cost, come equipped with one page of compression memory that utilizes data compression technology.
In any case, with a processing system of this kind, user interface specifications with which a printer apparatus is equipped, namely printer language (PDL) and commands, are converted to more primitive intermediate codes and image data is generated from these intermediate codes. Since the intermediate codes are items of primitive data, the efficiency of processing for generating images can be improved by using hardware as the components for processing these codes.
More specifically, rather than using software to render the individual processing units of intermediate codes such as well-known run-length data and vector data, high-speed rendering is carried out using hardware to thereby raise the above-mentioned band processing speed. This makes it possible to perform printing processing is page units without using one page of image memory. The result is a reduction in total cost.
However, since the units capable of being processed by hardware used to perform high-speed processing in this manner are primitive, the number of such primitive processing units needed to print complicated graphics becomes enormous. Consequently, though the processing of each processing unit can be speeded up, the quantity of processing increases. As a result, there is the possibility that overrun will occur or that the quantity of intermediate codes will exceed the amount of image data to be generated.
In order to deal with such a situation, the time needed to generate one band of image data is calculated from the quantity of print data itself or from the processing time of the individual processing units of intermediate codes logically introduced. If there is a large amount of processed data, rendering time is prolonged and, as a result, the risk of overrun occurs. Accordingly, the occurrence of overrun is predicted as by comparing the time calculated through the above-mentioned method with the data rate (printing speed) of the printer engine.
If occurrence of overrun is predicted, rendering of a band is performed prior to the start of the printing operation, the generated image data is compressed and the compressed data is stored. To realize printing, the compressed data is decompressed at printing time at a processing speed that is in conformity with the data rate of the printer engine. Such rendering processing and processing for the subsequent compression/decompression executed before the start of the printing operation is referred t o as pre-rendering processing. Pre-rendering processing makes it possible to achieve both a reduction in required memory and prevention of overrun. Such processing is complicated, however, and invites a decline in printer throughput.
An object of the present invention is to provide an image output control method and a printing apparatus in which, when overrun is predicted, pre-rendering processing, namely compression/decompression processing subsequent to image development, is executed in dependence upon an indication from a data supply source which grasps the content of print data, thereby avoiding the risk of overrun, and in which throughput is raised by not executing pre-rendering in regard to print data that will not lead to overrun.
Further, another object of the present invention is to provide a printing apparatus for forming and outputting an image in band units obtained by partitioning a page into bands, comprising: receiving means for receiving print data and designation information which designates an output procedure for the print data; intermediate data generating means for generating intermediate data from the print data, the intermediate data being compressed image data, which is obtained by generating and compressing image data, or an intermediate code, depending upon a designation made by the designation information; image generating means for generating image data from the intermediate data generated by the intermediate data generating means, and storing the image data alternately in two band areas; and output means for printing out the image data, which has been generated by the image generating means, alternately from the two band areas.
Another object of the present invention is to provide a printing system comprising host apparatus for generating print data in page units, and a printing apparatus, which is connected to the host apparatus, for forming and outputting an image in band units obtained by partitioning a page into bands, wherein the host apparatus includes: estimating means for estimating, for each band, necessary time needed to generate image data from print data; and designating means for determining whether the necessary time estimated by the estimating means has exceeded a predetermined value, and generating designation information which, depending upon the determination made, designates either generation of compressed image data or generation of intermediate codes from the print data; and the printing apparatus includes: receiving means for receiving print data and designation information which designates an output procedure for the print data; intermediate data generating means for generating intermediate data from the print data, the intermediate data being compressed image data, which is obtained by generating and compressing image data, or an intermediate code, depending upon a designation made by the designation information; image generating means for generating image data from the intermediate data generated by the intermediate data generating means, and storing the image data alternately in two band areas; and output means for printing out the image data, which has been generated by the image generating means, alternately from the two band areas.
A further object of the present invention is to provide a printing control apparatus for generating print data in page units and causing the print data to be output by a printing apparatus, comprising: estimating means for estimating, for each band, necessary time needed to generate image data from print data; designating means for determining whether the necessary time estimated by the estimating means has exceeded a predetermined value, and generating designation information which, depending upon the determination made, designates either generation and compression of image data or generation of intermediate codes from the print data; and sending means for sending the designation information generated by the designating means to the printing apparatus together with the print data.
Yet another object of the present invention is to provide an image output control method for forming and outputting an image in band units obtained by partitioning a page into bands, comprising: a receiving step of receiving print data and designation information which designates an output procedure for the print data; an intermediate data generating step of generating intermediate data from the print data, the intermediate data being compressed image data, which is obtained by generating and compressing image data, or an intermediate code, depending upon a designation made by the designation information; an image generating step of generating image data from the intermediate data generated at the intermediate data generating step, and storing the image data alternately in two band areas; and an output step of printing out the image data, which has been generated at the image generating step, alternately from the two band areas.
A further object of the present invention is to provide an image output control method for generating print data in page units and causing the print data to be output by a printing apparatus, comprising: an estimating step of estimating, for each band, necessary time needed to generate image data from print data; a designating step of determining whether the necessary time estimated at the estimating step has exceeded a predetermined value, and generating designation information which, depending upon the determination made, designates either generation and compression of image data or generation of intermediate codes from the print data; and a sending step of sending the designation information generated at the designating step to the printing apparatus together with the print data.
Still another object of the present invention is to provide computer readable storage medium for storing a program which includes: a receiving processing step of receiving print data and designation information which designates an output procedure for the print data; an intermediate data generating processing step of generating intermediate data from the print data, the intermediate data being compressed image data, which is obtained by generating and compressing image data, or an intermediate code, depending upon a designation made by the designation information; an image generating processing step of generating image data from the compressed image data or intermediate code, and storing the image data alternately in two band areas; and an output processing step of printing out the generated image data alternately from the two band areas.
Still another object of the present invention is to provide a computer readable storage medium for storing a program for generating print data in page units and causing the print data to be output by a printing apparatus, comprising: a processing step of estimating, for each band, necessary time needed to generate image data from print data; a processing step of determining whether the estimated necessary time has exceeded a predetermined value, and generating designation information which, depending upon the determination made, designates either generation and compression of image data or generation of intermediate codes from the print data; and a processing step of sending the generated designation information to the printing apparatus together with the print data.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.